package com.cam.test;

import org.apache.commons.lang3.StringUtils;
import org.junit.Test;

import java.io.*;

public class RemoveOrder {

    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new FileReader("D:\\copy.txt"));
        BufferedWriter writer = new BufferedWriter(new FileWriter("D:\\paste.txt"));
        String content = "";
        while ((content = reader.readLine())!= null){
            int i =0;
            while (i<=1) {
                try {
                    content.charAt(0);
                }catch (Exception e){
                    break;
                }
                if (Character.isDigit(content.charAt(0))) {
                    content = content.replace(content.charAt(0) + "", "");
                }
                i++;
            }
            if(!StringUtils.isNotBlank(content)){
                continue;
            }
            writer.write(content);
            writer.newLine();
            writer.flush();
        }
        writer.close();
        reader.close();
    }

    @Test
    public void test(){
        String sb = "sss.jpg";
        sb = sb.substring(sb.lastIndexOf('.'));
        System.out.println("sb = " + sb);
        System.out.println(sb.length());
    }

}
